import string

class command:
	def do(self,cmd):
		cmdlist = string.split(cmd)[1:]
		oldnick = self.protocol.nickname
		self.protocol.nickname = cmdlist[0]
		self.protocol.send("Server: Your name has been changed to "+cmdlist[0])
		log("%s has changed their nickname to %s"%(oldnick,cmdlist[0]), logger.INFO)